<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />

	<title>欢乐钓鱼</title>
	<link type="text/css" href="{RES}style/index.css" rel="stylesheet" />
<link type="text/css" href="{RES}style/common.css" rel="stylesheet" />
	<link type="text/css" href="{RES}style/animate.min.css" rel="stylesheet" />

<link type="text/css" href="{RES}style/dialog.css" rel="stylesheet" />
<link type="text/css" href="{RES}style/liMarquee.css" rel="stylesheet" />

	<script type="text/javascript" src="{RES}script/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="{RES}script/jquery.cookie.js"></script>
	<script src="{RES}/script/x0popup.min.js"></script>
	<script src="{RES}/script/rainbow.min.js"></script>
	<script src="{RES}/script/rainbow.linenumbers.min.js"></script>
	<script src="{RES}/script/jquery.liMarquee.js"></script>
	
		<link rel="stylesheet" href="{RES}/style/x0popup.min.css">
	<link rel="stylesheet" href="{RES}/style/rainbow.monokai.css">
	<link rel="stylesheet" href="{RES}/style/mian.css">
		<style type="text/css">
			.info {
				width: 180px;
				height: 80px;
				background: url({RES}/style/img_d/info.png) no-repeat;
				background-size: 100%;
			}
			.footer{
				background: url({RES}style/img_d/bj-tab.png) no-repeat;
			}
			.footer .btn{
				background: url({RES}style/img_d/btn.png) bottom no-repeat;
				background-size: 100% 100%;
			}
			.footer .btn:active{
				background: url({RES}style/img_d/btn2.png) bottom no-repeat;
				background-size: 100% 100%;
			}
			.footer .btn span{
				background: url({RES}style/img_d/star.png) left center/25px 25px no-repeat,url({RES}style/img_d/jiantou-icon.png) right 8px/15px 15px no-repeat;
			}
			.footer .btn-val .btn-val-list span:first-of-type{
				background: url({RES}style/img_d/star.png) left center no-repeat;
			}
			.games-module-show span:last-of-type{
				background: url({RES}style/img_d/jiantou-icon.png) right center/10px 10px no-repeat;
			}
			.footer .btn-val .btn-val-list span:first-of-type{
	width: 20px;
	height: 20px;
	padding-right: 3px;
	background-size: 20px 20px;
}
			
		</style>
</head>
<body class="body">
<div class="memberlogo info" style="position:fixed;z-index:999;left:5px;top:10px;display:none">
	<img src="{$memberavatar}"  style="left:6.45px;top:5.85px;width: 45px;height: 45px;border-radius: 50%;box-shadow: 0 0 0 2px rgba(255, 255, 255,0.3);"/>
	<p style="font-size:1.2em;color:black;float:right;margin-right:45%;margin-top:10px;font-family:'微软雅黑';font-weight:600;">{$membernickname}

	
	</p>
<!-- 
			<select id="pointtimes" style="border-radius:5px;" name="pointtimes">
			<option value="1">1倍</option>
			<option value="2">2倍</option>
			<option value="3">3倍</option>
			<option value="4">4倍</option>
		</select>
 -->
</div>



<div class="test_triangle_border"  style="position:fixed;z-index:9999;right:10px;top:8px;display:none">
	<a href="{$allconfig[pointmall]}"><img src="{RES}style/img_d/task.png" style="width:32px;height:32px;border-radius:100px"/></a>
	<a href="javascript:void(0)" class="clickimg"><img src="{RES}style/img_d/mao.png"  style="width:30px;height:30px;border-radius:100px"/></a>
    <div class="popup" style="display:none">
    	<span><em></em></span>
 		<ul>
			<li class="popupli"><a href="javascript:void(0)" onclick="alertplayhistory()">垂钓记录</a></li>
			<li class="popupli"><a href="javascript:void(0)" onclick="alertplayrule()">游戏玩法</a></li>
			<script type="text/javascript">
				function alertplayhistory(){
					eval(x0p('', ''));
					$(".text").append('<iframe id="myiframe" style="max-height:460px" src="{php echo $this->createMobileUrl("history");}" width="100%" height=460 scrolling="yes" frameBorder=0></iframe>');
					$("#myiframe").load(function(){
						var myiframe = $(this).contents().find("body").height();
						$(this).height(myiframe);
					})
				}
				function alertplayrule(){
					eval(x0p('', ''));
					$(".text").append('<iframe id="myiframe" style="max-height:410px" src="{php echo $this->createMobileUrl("rule");}" width="100%" height=460 scrolling="yes" frameBorder=0 onLoad=""></iframe>');
					
					$("#myiframe").load(function(){
						var myiframe = $(this).contents().find("body").height();
						$(this).height(myiframe);
					})
				}
			</script>

			<li class="popupli"><a href="javascript:void(0)" onclick="alertrankinglist()">排行榜</a></li>
			<script>
					function alertrankinglist(){
						eval(x0p('', ''));
						$(".text").append('<iframe id="myiframe" style="max-height:460px" src="{php echo $this->createMobileUrl("rankinglist");}" width="100%" height=460 scrolling="yes" frameBorder=0 onLoad=""></iframe>');
						$("#myiframe").load(function(){
							var myiframe = $(this).contents().find("body").height();
							$(this).height(myiframe);
						})
					}

			</script>
			<li class="popupli"><a href="{$allconfig[pointmall]}">兑换奖品</a></li>
			<li><a href="{$allconfig[firstpage]}">大厅首页</a></li>
		</ul>      	
    </div>
</div>
<script type="text/javascript">
	$(".clickimg").click(function(){
		if($(".popup").css("display")=="none"){
			$(".popup").show();
		}else{
			$(".popup").hide();
		}
		
	})
	document.ontouchmove = function(e){ e.preventDefault(); };
</script>
<style type="text/css">

#gamediv_canvas{
	display:block;
}
.popup ul li{
	text-align:center;
	width:70px;
}
.popupli{
	padding-bottom:20px;
	text-align:center;
	width:50px;
}
.test_triangle_border a{
    color:#333;
    font-weight:bold; 
    text-decoration:none;
    color:#99A0A3;
}
.test_triangle_border .popup{
    background:#4F5D73; 
    padding:10px; 
    color:#333;  
    border-radius:4px;
    position:absolute; 
    top:40px; 
    right:0px;
    border:0px solid #333;
}
.test_triangle_border .popup span{
    display:block; 
    width:0; 
    height:0; 
    border-width:0 0px 0px; 
    border-style:solid; 
    border-color:transparent transparent #4F5D73; 
    position:absolute; 
    top:-10px; 
    right:5%;/* 三角形居中显示 */
    margin-left:-10px;/* 三角形居中显示 */
}
.test_triangle_border .popup em{
    display:block; 
    width:0; 
    height:0; 
    border-width:0 6px 6px; 
    border-style:solid; 
    border-color:transparent transparent #4F5D73; 
    position:absolute; 
    top:4px; 
    left:-18px;
}
.scrollnav{
	position:fixed;
	margin:auto;
	left:0;
	right:0;
	z-index:999;
	width:90%;
	top:18%;
	background:gray;
	border-radius:4px;
	filter:alpha(Opacity=80);
	-moz-opacity:0.5;
	opacity: 0.5;
	color:black;
	display:none;
}
.scrollnav a{
	letter-spacing:2px;
	margin-right:5px;
}
</style>
<a class="addpointbutton" href="{$allconfig['pointadd']}" style="display:none;border:0px;"><img style="border:0px;width:24px;height:24px;position:fixed;z-index:999;right:8%;top:10%"/></a>
<div class="scrollnav">
	{loop $dummylist $index $value}
	<a href="javascript:return false;" onclick="javascipt:void(0)">{$value}</a>
	{/loop}
	{loop $historylist $index $value}
	
	<a href="javascript:return false;" onclick="javascipt:void(0)">{$value['nickname']}获得了{$value['getpoint']}{$allconfig["pointname"]}</a>
	{/loop}
</div>
	<div id="gamediv"></div>
<input id="bt-game-id" type="hidden" value="fishinglegend">
	<script type="text/javascript">

		var res = "{RES}";
		var attrurl = "{ATTRACHURL}";
		var smallestfishjoltingrate = {$datalist[smallestfishjoltingrate]}; //鱼最小震动频率
		var bigestfishjoltingrate = {$datalist[bigestfishjoltingrate]};//鱼最小震动频率
		var speed = {$datalist[fishspeed]};//鱼速
		var lowestfishswimheight = {$datalist[lowestfishswimheight]}; //鱼游动距离屏幕顶部高度范围最小值
		var heightestfishswimheight = {$datalist[heightestfishswimheight]};//鱼游动距离屏幕顶部高度范围最大值
		var gamefps = {$datalist[frameskip]};
		var bigestfishupanddownamplitude = {$datalist[bigestfishupanddownamplitude]}; //鱼上下游动最大幅度
		var smallestestfishupanddownamplitude = {$datalist[smallestestfishupanddownamplitude]}; //鱼上下游动最小幅度
		var fishdencity = {$datalist[fishdencity]};//鱼群密度
		var backgroundimg = attrurl+'{$datalist[gamebgimgurl]}';
		var intDifffirst = parseInt({$datalist[gametime]});
		var intDiff = parseInt({$datalist[gametime]});//倒计时总秒数量
		{if $taskid}var memberpoint = parseInt({$memberpoint})+parseInt({$firstplayget});var firstplayget = parseInt({$firstplayget});{else}var memberpoint = parseInt({$memberpoint});{/if}
		var HOOKS_NUMBER = parseInt(memberpoint/{$datalist[onetimepay]});





		var onetimepay = parseInt({$datalist[onetimepay]});
		{if $freenumber}
		//HOOKS_NUMBER = HOOKS_NUMBER+parseInt({$freenumber});
		var HOOKS_NUMBER = parseInt({$freeplaytime});//免费钩次数


		
			var onetimefreetime = parseInt({$freetime});//免费钩次数			
		
		if(HOOKS_NUMBER<0){
			alert("免费次数已用完，即将跳转到积分模式");
			//window.location.href="{$_W['siteroot']}"+"index.php?i=2&c=entry&do=Fish&m=game_fish";
			window.location.href="{php echo $this->createMobileUrl('Fish')}"
			//header('Location: '+"{$_W['siteroot']}"+"index.php?i=2&c=entry&do=Fish&m=game_fish");
		}
		var Free = true;
		//memberpoint = memberpoint+onetimepay*parseInt({$freenumber});
		{else}
			var onetimefreetime = "test";
		{/if}
		{if $addhooknumber}
			HOOKS_NUMBER = HOOKS_NUMBER+1;
			memberpoint = memberpoint+onetimepay;
		{/if}
		var inblacklist = "{$inblacklist}";
		
		$.cookie("scorepoint",parseInt(memberpoint));
		var homepage = "{$allconfig[firstpage]}";
		var myhomepage = "{$_W['siteroot']}app/index.php?i=2&c=entry&do=Fish&m=game_fish";
		var fishlist = $.parseJSON('{$fishlistjson}');
		var fishType = 	[
			{loop $fishlist $fishkey $fishvalue}
			{
				stype:"{$fishkey}"
				,images:[
						{name:"{$fishvalue[fishname]}",width:{$fishvalue[fishwidth]}, height:{$fishvalue[fishheight]}, frameNumber:1},
				]
			},
			{/loop}
			];
		var payallpoint = 0;
		//res+"style/img_d/hook.png"
		var loadData = [
		    			{name : "hook",path : res+"style/img_d/hook.png"},
		    			{loop $fishlist $fishkey $fishvalue}
		    			{name : "{$fishvalue[fishname]}",path : attrurl+"{$fishvalue[fishimgurl]}"},
		    			{/loop}

			{name : "score_board",path : res+"style/img_d/score_board.png"}
			,{name : "start_btn",path : res+"style/img_d/start_btn.png"}
			,{name : "continue_btn",path : res+"style/img_d/continue_btn.png"}
			,{name : "more_btn",path : res+"style/img_d/more_btn.png"}
			,{name : "sound_on",path : res+"style/img_d/sound_on.png"}
			,{name : "sound_off",path : res+"style/img_d/sound_off.png"}
			// ,{name : "face_normal",path : "style/img_d/face_normal.png"}
			// ,{name : "face_happy",path : "style/img_d/face_happy.png"}
			// ,{name : "face_sad",path : "style/img_d/face_sad.png"}
			,{name : "bubble",path : res+"style/img_d/bubble.png"}
			,{name : "share",path : res+"style/img_d/share.jpg"}
			,{name : "logo",path : res+"style/img_d/logo.png"}
			,{name : "background",path : backgroundimg}
			,{name : "start_bg",path : res+"style/img_d/start_bg.jpg"}
			,{type : "js",path : res+"script/GameBody.js"}
			,{type : "js",path : res+"script/GameOver.js"}
			,{type : "js",path : res+"script/FishManager.js"}
			,{type : "js",path : res+"script/Fish.js"}
			,{type : "js",path : res+"script/Hook.js"}
			,{type : "js",path : res+"script/Background.js"}
			,{type : "js",path : res+"script/Logo.js"}
			,{type : "js",path : res+"script/Score.js"}
			,{type : "js",path : res+"script/SoundPlayer.js"}
		];
	</script>

	
	<script type="text/javascript" src="{RES}script/plugin/lufylegend-1.9.1.min.js"></script> 
	<script src="{RES}script/Main.js" type="text/javascript"></script>
	<script src="{RES}script/common.js"></script>
	<script src="{RES}script/dialog.js"></script>
	<style type="text/css">
		.tasktable{
			width:100%;
			font-size:1.1rem;
		}
		.tasktable th,.tasktable td{
			width:50%;
			text-align:center;
			border-bottom:1px solid lightgray;
		}
		.tasktable .buttonth,.tasktable .buttontd{
			padding:10px;
		}
		.taskbutton{
			border-radius:3px;
			padding:5px 10px;
			background-color:lightblue;
			
			border:0px;
		}
	</style>
<style type="text/css">
/*样式重置*/
*{
	margin: 0;
	padding: 0;
	font-family: "微软雅黑";
}
a{
	text-decoration: none;
	color: #f1f4ff;
}
.pop-wrap {
	position: fixed;
    width: 83%;
    height: 450px;
    margin-left: 26px;
    border-radius: 5px;
    top: 55px;
    border: 4px solid #2f3139;
    background: #292D36;
    color: #f1f4ff;
    z-index:99999999;
}
.logo{
	position: absolute;
	top: -40px;
	left: -5%;
	width: 110%;
	height: 70px;
	background: url({RES}/style/img_d/alertlogo.png) no-repeat;
	background-size: 100%;
}

.close-btn {
	position: absolute;
	top: -10px;
	right: 0px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
}

.nav {
	margin-top: 20px;
	width: 100%;
	height: 40px;
	line-height: 40px;
	font-size: 14px;
	display: flex;
	justify-content: space-around;
	background: #292d36;
}
.nav i{
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-right: 3px;
	margin-bottom: -3px;	
}
.nav-btn1-on{
	border-bottom: 3px solid #ee503f;
}
.nav-btn1-on i{
	background: url({RES}/style/img_d/icon2.png) no-repeat;
	background-size: 100%;
}
.nav-btn1-off{
	color: #656b81;
	border-bottom: none;
}
.nav-btn1-off i{
	background: url({RES}/style/img_d/icon1.png) no-repeat;
	background-size: 100%;
}
.nav-btn2-on{
	border-bottom: 3px solid #ee503f;
}
.nav-btn2-on i{
	background: url({RES}/style/img_d/icon4.png) no-repeat;
	background-size: 100%;
}
.nav-btn2-off{
	color: #656b81;
	border-bottom: none;
}
.nav-btn2-off i{
	background: url({RES}/style/img_d/icon3.png) no-repeat;
	background-size: 100%;
}

.list ul {
	height: 390px;
	overflow: auto;
	margin: 0;
	padding-left: 15px;
	padding-right: 15px;
	list-style: none;
	background: #262931;
	font-size: 20px;
}

.list ul li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	height: 70px;
	border-bottom: 2px solid #2d2f37;
}
.list ul li .list-li-left {
	display: flex;
	align-items: center;
}
.list ul li .list-li-left img{
	width: 40px;
	height: 40px;
	border-radius: 5px;
}
.list ul li .list-li-left-tit{
	display: flex;
	flex-direction: column;
	height: 40px;
	justify-content: center;
	margin-left: 10px;
}
.list ul li .list-li-left-tit span:nth-of-type(1){
	font-size: 16px;
}
.list ul li .list-li-left-tit span:nth-of-type(2){
	font-size: 12px;
	color: #f1a645;
}
.list ul li .list-li-right a{
	display: inline-block;
	width: 62px;
	height: 30px;
	line-height: 30px;
	font-size: 16px;
	font-weight: bold;
	text-align: center;
	background: #ee503f;
	border-radius: 5px;
}
.list ul li .list-li-right a:active{
	background: #671d15;
}
.list ul li .list-active a{
	background: #f09431;
}
</style>
		<div class="pop-wrap" style="display: none">
			<div class="logo"></div>
			<div class="close-btn"></div>
			<div class="nav">
				<span id="navBtn1" class="nav-btn1-on"><i></i>每日任务</span>
				<span id="navBtn2" class="nav-btn2-off"><i></i>成长任务</span>
			</div>
			<div class="list" id="content1">
				<ul>

				</ul>
			</div>
			<div class="list" id="content2" style="display: none;">
				<!--<ul>
					<li>
						<div class="list-li-left">
							<img src="{RES}/style/img_d/icon.png" />
							<div class="list-li-left-tit">
								<span>每天签到领金豆</span>
								<span>随机数量</span>
							</div>
						</div>
						<div class="list-li-right">
							<a href="#">前往</a>
						</div>
					</li>
					<li>
						<div class="list-li-left">
							<img src="{RES}/style/img_d/icon.png" />
							<div class="list-li-left-tit">
								<span>每天签到领金豆</span>
								<span>随机数量</span>
							</div>
						</div>
						<div class="list-li-right">
							<a href="#">前往</a>
						</div>
					</li>
				</ul>
				  -->
			</div>
		</div>
		
			<div class="itemlist time-item" style="position:fixed;z-index:9999;top:71px;left:3px;display:none;">
			<div class="timer-box">
				{if $noselect==1}
				<div class="games-module">
					<div class="games-module-show" id="changeGames">
						<img src="{RES}style/img_d/moshi1.png" />
						<span>{if $nowgamename}{$nowgamename}{else}{$activitytoitemidarray[0]}{/if}</span>
						<span></span>
					</div>
					<div class="games-module-hide" style="display: none;">
						{loop $activitytoitemidarray $index $value}
						<div>
							<img src="{RES}style/img_d/moshi1.png" />
							<span><a href="{php echo $this->createMobileUrl('fish',array('gamename'=>$value))}">{$value}</a></span>
						</div>
						{/loop}

					</div>
				</div>
				{/if}
<div class="time-item" style="display:none">


<!-- 	<span id="day_show">0天</span>

	<strong id="hour_show">0时</strong> -->

	<strong id="minute_show" style="width:50px;">0分</strong>

	<strong id="second_show">0秒</strong>

</div>				
			</div>
			</div>
		</div>	
		
		
		


		<div class="footer time-item" style="display:none">

			{if $freenumber}
				<div class="btn" id="btn">
					<span gold="X1" class="freetimespan" style="background:url()">免费×{$freeplaytime}</span>
				</div>
			{else}
				<div class="btn" id="btn">
					<span gold="100">100</span>
				</div>
				<div class="btn-val" id="btnVal" style="display: none;">
				{loop $hooklist $index $value}
				<div class="btn-val-list">
					<span></span>
					<input type="hidden" value="{$value['hookimgurl']}"/>
					<span gold="{$value['hookpaypoint']}">{$value['hookpaypoint']}</span>
				</div>
				{/loop}
				<div class="btn-list-jiantou"></div>
			</div>						
			{/if}
			
			
		</div>
	<script type="text/javascript">
	var pointtimes = 1;
	var redirurl = "{$_W['siteroot']}"+"index.php?i=2&c=entry&do=Fish&m=game_fish";
	$(document).ready(function() {
		{if $used}
			alert("二维码已过期！即将跳转到游戏首页");
			//window.location.href="{$_W['siteroot']}"+"index.php?i=2&c=entry&do=Fish&m=game_fish";
			window.location.href="{php echo $this->createMobileUrl('Fish')}"

			//header('Location: '+"{$_W['siteroot']}"+"index.php?i=2&c=entry&do=Fish&m=game_fish");
		{/if}
		{if $firstplayget}
			alert("参与活动赠送{$firstplayget}{$allconfig["pointname"]}");
		{/if}
		{if $taskid}
			$.cookie("goback","goback");
		{/if}
		{if !$freenumber}
		//底部按钮JS
		var goldLists = $(".btn-val-list");
		var marginTop=(-125-(goldLists.length-1)*40)+"px";
		$(".btn-val").css("margin-top",marginTop);

		$(goldLists).children("span:last-of-type[gold=100]").parent().css("background", "url({RES}style/img_d/right-icon.png) left center/15px 15px no-repeat"); //弹出框gold=100默认打个勾
		for(var j = 0; j < goldLists.length; j++) {
			goldLists[j].onclick = function() {
				$(".btn-list-jiantou").toggle(250);
				$(goldLists).css("background", "none");
				$(this).css("background", "url({RES}style/img_d/right-icon.png) left center/15px 15px no-repeat");
				gold = parseInt($(this).children("span:last-of-type").attr("gold"));
				pointtimes = gold/onetimepay;
				$("#btn").children("span").text(gold).attr("gold", gold); //改变并赋值按钮值
				//hookpath = $(".btn-val-list").children("input").val();
				//loadData[0].path=res+hookpath;
				//console.log(loadData);

				//console.log($("#btn").children("span").attr("gold")); //打印按钮值看看
				setTimeout(function() {
					$("#btnVal").slideToggle(80);
				}, 50);
			}
		}
		$("#btn").on("click", function() {
			$(".btn-list-jiantou").toggle(80);
			$("#btnVal").slideToggle(80);
		});
		{/if}


		//游戏模式选择框JS
		var gamesLists = $(".games-module-hide div");
		$("#changeGames").on("click", function() {
			if($(".games-module-hide").css("display") == "none") {
				$(".games-module-hide").toggle();
				$("#changeGames span:last-of-type").css("transform", "rotate(0deg)");
			} else {
				$(".games-module-hide").toggle();
				$("#changeGames span:last-of-type").css("transform", "rotate(180deg)");
			}
		})
		for(var k=0;k<gamesLists.length;k++){
			gamesLists[k].onclick=function(){
				$("#changeGames").children("img").attr("src",$(this).children("img").attr("src")).next().text($(this).children("span").text());
				$("#changeGames span:last-of-type").css("transform", "rotate(180deg)");
				$(".games-module-hide").toggle();
				gamePlay();
			}
		}
	})
</script>
	<script type="text/javascript">

	function formattime(stringTime){
		return Date.parse(new Date(stringTime))/1000;
	}
	{if $alert==1}
	window.onload=function(){
		alert("游戏未配置，请和管理员联系");
	}
	{/if}
	 {if $alertornot==1}
		window.onload=function(){
			{if !$freenumber}
			$(".pop-wrap").toggle();
			{/if}
			var uid = {$memberuid};
			$.post('{php echo $this->createMobileUrl("getTask")}',{uid:uid},function(data){
				$dataobject = $.parseJSON(data);
				for($i=0;$i<$dataobject.length;$i++){
					var gamebegintime = formattime($dataobject[$i].gamebegintime);
					var gameendtime = formattime($dataobject[$i].gameendtime);


					if(gamebegintime<{$nowtime}&&{$nowtime}<gameendtime){
						if($dataobject[$i].buttonstatus=="yes"){
							$("#content1 ul").append('<li><div class="list-li-left"><img src="{$_W['attachurl']}'+$dataobject[$i].taskheadimg+'"><div class="list-li-left-tit"><span>'+$dataobject[$i].taskmessage+'</span></div></div><div class="list-li-right list-active"><a href="{php echo $this->createMobileUrl("Fish",array("uid"=>$memberuid,"tasktime"=>$tasktime))}&taskid='+$dataobject[$i].id+'">领取</a></div></li>');
						}
						if($dataobject[$i].buttonstatus=="no"){
							
							$("#content1 ul").append('<li><div class="list-li-left"><img src="{$_W['attachurl']}'+$dataobject[$i].taskheadimg+'"><div class="list-li-left-tit"><span>'+$dataobject[$i].taskmessage+'</span></div></div><div class="list-li-right list-active"><a href="javascript:void(0)" style="background:lightgray">已参与</a></div></li>');
						}
						if($dataobject[$i].buttonstatus=="dayfi"){
							
							$("#content1 ul").append('<li><div class="list-li-left"><img src="{$_W['attachurl']}'+$dataobject[$i].taskheadimg+'"><div class="list-li-left-tit"><span>'+$dataobject[$i].taskmessage+'</span></div></div><div class="list-li-right list-active"><a href="javascript:void(0)" style="background:lightgray">日领取</a></div></li>');
						}
					}

//					if({$nowtime}>gameendtime){
//						$("#content1 ul").append('<li><div class="list-li-left"><img src="{$_W['attachurl']}'+$dataobject[$i].taskheadimg+'"><div class="list-li-left-tit"><span>'+$dataobject[$i].taskmessage+'</span></div></div><div class="list-li-right list-active"><a href="javascript:void(0)" style="background:lightgray">已结束</a></div></li>');
//					}
//
//					if({$nowtime}<gamebegintime){
//						$("#content1 ul").append('<li><div class="list-li-left"><img src="{$_W['attachurl']}'+$dataobject[$i].taskheadimg+'"><div class="list-li-left-tit"><span>'+$dataobject[$i].taskmessage+'</span></div></div><div class="list-li-right list-active"><a href="javascript:void(0)" style="background:lightgreen">未开始</a></div></li>');
//					}
				}
		})
		}
		$(".close-btn").click(function() {
			$(".pop-wrap").toggle();
		});
		$("#navBtn1").click(function() {
			$("#content2").hide();
			$("#content1").show();
			$("#navBtn1").addClass("nav-btn1-on").removeClass("nav-btn1-off");
			$("#navBtn2").addClass("nav-btn2-off").removeClass("nav-btn2-on");
		});
		$("#navBtn2").click(function() {
			$("#content1").hide();
			$("#content2").show();
			$("#navBtn1").addClass("nav-btn1-off").removeClass("nav-btn1-on");
			$("#navBtn2").addClass("nav-btn2-on").removeClass("nav-btn2-off");
		});
	{/if}
		window.onerror = function(e) {
			
		}

	</script>



<style type="text/css">
.time-item{

}
.time-item strong {

	background:black;

	color:#fff;

	line-height:27px;

	margin-left:5px;
	font-size:12px;

	font-family:Arial;

	padding:0 3px;


	border-radius:5px;

	box-shadow:1px 1px 3px rgba(0,0,0,0.2);

}

#day_show {

	float:left;

	line-height:49px;

	color:#c71c60;

	font-size:32px;

	margin:0 10px;

	font-family:Arial,Helvetica,sans-serif;

}

.item-title .unit {

	background:none;

	line-height:49px;

	font-size:24px;

	padding:0 10px;

	float:left;

}
</style>
<script type="text/javascript">



var timers;


var scrollnav = $('.scrollnav').liMarquee();
function timer(intDiff){

	timers = window.setInterval(function(){

	var day=0,

		hour=0,

		minute=0,

		second=0;//时间默认值		

	
	if(intDiff > 0){

		day = Math.floor(intDiff / (60 * 60 * 24));

		hour = Math.floor(intDiff / (60 * 60)) - (day * 24);

		minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);

		second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);

	}
	if(intDiff === -1){
		gameOver();
		$(".time-item").hide();
		scrollnav.liMarquee("destroy");
		$(".addpointbutton").hide();
		$(".memberlogo").hide();
		$(".test_triangle_border").hide();
		clearInterval(timers); 
		intDiff=intDifffirst;
		var day=0,

		hour=0,

		minute=0,

		second=0;//时间默认值	
	}
	if (minute <= 9) minute = '0' + minute;

	if (second <= 9) second = '0' + second;

	$('#day_show').html(day+"天");

	$('#hour_show').html('<s id="h"></s>'+hour+'时');

	$('#minute_show').html('<s></s>'+minute+'分');

	$('#second_show').html('<s></s>'+second+'秒');
	intDiff--;
	}, 1000);
 
} 
function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
            + " " + date.getHours() + seperator2 + date.getMinutes()
            + seperator2 + date.getSeconds();
    return currentdate;
}
var addhookmessage = 0;
var posturl = "{php echo $this->createMobileUrl('point')}";
function overgameajax(){
	addhookmessage += 1;
	{if $firstplayget}
		{if $addhooknumber}
			if(addhookmessage==1){
				var scorecookie = $.cookie("score")-$.cookie("clicktime")*onetimepay+onetimepay+firstplayget;
			}else{
				var scorecookie = $.cookie("score")-$.cookie("clicktime")*onetimepay+firstplayget;
			}
		{else}
			var scorecookie = $.cookie("score")-$.cookie("clicktime")*onetimepay+firstplayget;
		{/if}
		
	{else}
		{if $addhooknumber}
			if(addhookmessage==1){
				var scorecookie = $.cookie("score")-$.cookie("clicktime")*onetimepay+onetimepay;
			}else{
				var scorecookie = $.cookie("score")-$.cookie("clicktime")*onetimepay;
			}
		{else}
			var scorecookie = $.cookie("score")-payallpoint;
		{/if}
	{/if}
	
	{if $freenumber}
		var scorecookie = $.cookie("score");
	{/if}
	var memberuid = {$memberuid};
	var membernickname = '{$membernickname}';
	var memberphonenum = '{$memberphonenum}';
	var memberavatar = '{$memberavatar}';
	var balance = '{$balance}';
	var point = '{$point}';
	
	var playtime = "{$nowtime}";
	var payall = $.cookie("clicktime")*onetimepay;
	var gamefishtime = getNowFormatDate();
	var openid = "{$_W['openid']}";
	{if $serialnumber}
		$.cookie("serialnum",{$serialnumber});
	{else}
		$.cookie("serialnum","aaa");
	{/if}
	//var serialnum = "{$serialnumber}";
		


}

</script>


	<script>
		$(document).ready(function(){
			{if $usedtime}
				alert("此模板游戏链接已使用，无法重复使用！");
				window.location.href="{php echo $this->createMobileUrl('Fish')}";

				//CloseSearch();
			{/if}
			$("#closeBtn").on("click",function(){
				$(".jd-wrap").toggle();
			})
			$("#gotoBtn").on("click",function(){
				window.location="{$allconfig["pointadd"]}";
			})
		})
		function CloseSearch() {
        var xmlhttp;
        if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        }
        else {// code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.abort();
        mystop();
        //alert("dddd");
    }

    function mystop() {
        if (!!(window.attachEvent && !window.opera))
        { document.execCommand("stop"); }
        else
        { window.stop(); }
    }
	</script>
	<style>
		.jd-wrap{
			display: none;
			position: absolute;
			top: 50%;
			left: 50%;
			margin-left: -130px;
			margin-top: -120px;
			width: 230px;
			height: 150px;
			padding-top: 70px;
			padding-left: 15px;
			padding-right: 15px;
			background: url({RES}style/img_d/getjd-bg.png) no-repeat;
			background-size: 100% 100%;
			text-align: center;
		}
		.jd-wrap p:first-of-type{
			font-size: 18px;
			font-weight: bold;
			color: #f1f4ff;
		}
		.jd-wrap p:nth-of-type(2){
			margin-top: 30px;
			color: #656b81;
			font-size: 12px;
		}
		.jd-wrap p:last-of-type{
			margin-top: 15px;
			width: 98%;
			height: 40px;
			line-height: 40px;
			font-size: 18px;
			color: #f1f4ff;
			background: #ee503f;
			border-radius: 5px;
		}
		.jd-wrap #gotoBtn:active{
			background: #95271b;
			font-weight: bold;
		}
		.jd-wrap #closeBtn{
			position: absolute;
			top: 33px;
			right: 5px;
			display: block;
			width: 25px;
			height: 25px;
		}
	</style>
	<div class="jd-wrap">
		<p>获取{$allconfig["pointname"]}</p>
		<p>{$allconfig["pointname"]}不够啦？若急需金豆，请点击按钮获取{$allconfig["pointname"]}。</p>
		<p id="gotoBtn">去获取</p>
		<span id="closeBtn"></span>
	</div>

</body>
</html>
